Galaxy formation and evolution